<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<meta http-equiv="content-language" content="en" />
	<meta name="robots" content="noindex,nofollow" />
	<link rel="stylesheet" media="screen,projection" type="text/css" href="admincss/reset.css" /> <!-- RESET -->
	<link rel="stylesheet" media="screen,projection" type="text/css" href="admincss/main.css" /> <!-- MAIN STYLE SHEET -->
	<link rel="stylesheet" media="screen,projection" type="text/css" href="admincss/2col.css" title="2col" /> <!-- DEFAULT: 2 COLUMNS -->
	<link rel="alternate stylesheet" media="screen,projection" type="text/css" href="admincss/1col.css" title="1col" /> <!-- ALTERNATE: 1 COLUMN -->
	<!--[if lte IE 6]><link rel="stylesheet" media="screen,projection" type="text/css" href="admincss/main-ie6.css" /><![endif]--> <!-- MSIE6 -->
	<link rel="stylesheet" media="screen,projection" type="text/css" href="admincss/style.css" /> <!-- GRAPHIC THEME -->
	<link rel="stylesheet" media="screen,projection" type="text/css" href="admincss/mystyle.css" /> <!-- WRITE YOUR CSS CODE HERE -->
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/jquery.tablesorter.js"></script>
	<script type="text/javascript" src="js/jquery.switcher.js"></script>
	<script type="text/javascript" src="js/toggle.js"></script>
	<script type="text/javascript" src="js/ui.core.js"></script>
	<script type="text/javascript" src="js/ui.tabs.js"></script>
	<script type="text/javascript">
	$(document).ready(function(){
		$(".tabs > ul").tabs();
		$.tablesorter.defaults.sortList = [[1,0]];
		$("table").tablesorter({
			headers: {
				0: { sorter: false },
				7: { sorter: false }
			}
		});
	});
	</script>
	<title>PMS FISAT | Admin</title>
</head>

<body>

<div id="main">

	<!-- Tray -->
	<div id="tray" class="box">

		<p class="f-left box">

			<!-- Switcher -->
			<span class="f-left" id="switcher">
				<a href="#" rel="1col" class="styleswitch ico-col1" title="Display one column"><img src="admindesign/switcher-1col.gif" alt="1 Column" /></a>
				<a href="#" rel="2col" class="styleswitch ico-col2" title="Display two columns"><img src="admindesign/switcher-2col.gif" alt="2 Columns" /></a>
			</span>

			<strong>FISAT Project Portal Administrator Panel</strong>

		</p>

		<p class="f-right">User: <strong><a href="#">Administrator</a></strong> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong><a href="/adminlogout" id="logout">Log Out</a></strong></p>

	</div> <!--  /tray -->

	<hr class="noscreen" />

	<!-- Menu -->
	<div id="menu" class="box">

		<ul class="box f-right">
			<li><a href="/admin"><span><strong>Visit Site &raquo;</strong></span></a></li>
		</ul>

		<ul class="box">
			<li><a href="projectpool"><span>View Project Pool</span></a></li> <!-- Active -->
			<li><a href="editprojectmain"><span>Edit Projects</span></a></li>
			<li><a href="reviewprojectmain"><span>Confirm Projects</span></a></li>
			<li><a href="confirmusermain"><span>Confirm Users</span></a></li>
			<li><a href="editusermain"><span>Edit Users</span></a></li>
			<li onmouseover="this.className = 'dropdown-on'" onmouseout="this.className = 'dropdown-off'"><div><a href="#"><span>Edit Fields</span></a>
				<!-- Dropdown menu -->
				<div class="drop">
					<ul class="box">
						<li><a href="updatecategory">Project category details</a></li>
						<li><a href="updatelanguage">Supported languages</a></li>
						<li><a href="updatefield">Project technology fields</a></li>
					</ul>
				</div> <!-- /drop -->
			</div></li>
			
			
		</ul>
		
	</div> <!-- /header -->

	<hr class="noscreen" />

	<!-- Columns -->
	<div id="cols" class="box">

		<!-- Aside (Left Column) -->
		<div id="aside" class="box">

			<div class="padding box">

				<!-- Logo (Max. width = 200px) -->
				<p id="logo"><a href="#"><img src="admintmp/logo.gif" alt="Our logo" title="Visit Site" /></a></p>

				<!-- Create a new project -->
				<p id="btn-create" class="box"><a href="addtopool"><span>Create a new project</span></a></p>

			</div> <!-- /padding -->

			<ul class="box">
				
				<li id="submenu-active"><a href="admin">Admin Panel </a> <!-- Active --></li>
				<li><a href="nextreview">Next review date</a></li>
				<li><a href="meetme">Come and meet me</a></li>
				<li><a href="answerquestionmain">Q&A panel</a></li>
				<li><a href="browseuseractivitymain">Browse user activity</a></li>
			</ul>

		</div> <!-- /aside -->

		<hr class="noscreen" />

		<!-- Content (Right Column) -->
		<div id="content" class="box">


			<h1>Language :</h1>
<h3>Add/Edit Language</h3>
 
<script type="text/javascript" src="/js/jquery-1.3.2.min.js"></script>
 
<style type="text/css">
	.jdiv{
		padding:8px;
	}
	.catbox{
		margin:1px 0px;
	}
</style>
 
 
<script type="text/javascript">
 
$(document).ready(function(){
 
    var counter = 2;
 
    $("#addButton").click(function () {
 
	if(counter>10){
            alert("Only 10 textboxes allow");
            return false;
	}   
 
	var newTextBoxDiv = $(document.createElement('div'))
	     .attr("id", 'TextBoxDiv' + counter);
 
	newTextBoxDiv.after().html('<label>Add Language '+ counter + ' : </label>' +
	      '<input type="text" class="catbox" name="textbox' + counter + 
	      '" id="textbox' + counter + '" value="" >');
 
	newTextBoxDiv.appendTo("#TextBoxesGroup");
 
 
	counter++;
     });
 
     $("#removeButton").click(function () {
	if(counter==1){
          alert("No more textbox to remove");
          return false;
       }   
 
	counter--;
 
        $("#TextBoxDiv" + counter).remove();
 
     });
 
     $("#getButtonValue").click(function () {
 

	 var msg=new Array();
	for(i=1; i<counter; i++){
   	  msg[i]= $('#textbox' + i).val();
	}
	//document.getElementById("emailadr").value=msg;
	//document.getElementById("team").submit();
	//$('#emailadr').val(msg)
	$('input[name=addlan]').val(msg);
		document.forms["team"].submit();
	
    	  //alert(msg);
     });
  });
</script>


 <form name='team' method=post action="/updatelanguage" id="team">
<b>Existing Languages:</b>
{%for i in list%}
<br><input type=checkbox checked=checked name={{i.0}} value={{i.0}}> {{i.1}}<br>
{%endfor%}
<br/><b>New Languages:</b>
<div id='TextBoxesGroup' class="jdiv">
	<div id="TextBoxDiv1" class="catbox">
		<label>Add Language 1 : </label><input type='textbox' id='textbox1' >
	</div>
</div>
<input type='button' value='Add More' id='addButton'>
<input type='button' value='Remove' id='removeButton'>
<input type='button' value='Save' id='getButtonValue'>
 <input type=hidden value="s" name=addlan>
 </form>

	</div> <!-- /footer -->

</div> <!-- /main -->

</body>
</html>
